<template>
	<view>
		<view class="mainpadding flexbetween" @click="jumpurl('/pages/system/system?type=2')">
			<view class="main_size hei_text">隐私政策</view>
			<u-icon name="arrow-right" color="#999" size="16"></u-icon>
		</view>
		<view class="mainpadding flexbetween" @click="jumpurl('/pages/system/system?type=1')">
			<view class="main_size hei_text">用户协议</view>
			<u-icon name="arrow-right" color="#999" size="16"></u-icon>
		</view>
		<view class="posibottom mainpadding">
			<view class="submitbtn" @click="outlogin">退出登录</view>
		</view>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {}
		},
		methods: {
			outlogin() {
				httpRequest.modal('是否确认退出登录', '', true, (res) => {
					if (res) {
						uni.removeStorageSync('token');
						uni.removeStorageSync('user_id');
						httpRequest.toast("退出登录成功")
						setTimeout(() => {
							uni.navigateBack(1)
						}, 1000)
					}
				})
			},
			jumpurl(url) {
				uni.navigateTo({
					url
				})
			}
		}
	}
</script>

<style scoped>
	.posibottom {
		position: fixed;
		left: 0;
		bottom: 0;
		width: 100%;
		box-sizing: border-box;
	}

	.submitbtn {
		width: 100%;
		background-color: #9e8d5e;
		border-radius: 50rpx;
		text-align: center;
		color: #fff;
		padding: 20rpx 0;
	}
</style>